package com.llb666.shop.order.domain.client;

import com.llb666.shop.order.domain.entity.client.UserAddress;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 用户地址 Repository
 *
 * @author llb666
 */
@Component
@FeignClient(contextId = "userAddressClient", value = "shop-user")
public interface UserAddressClient {

    /**
     * 根据用户和收货地址id查询用户收货地址.
     *
     * @param userId    用户id
     * @param addressId 用户收货地址Id
     * @return 用户收货地址
     */
    @GetMapping("address/info")
    UserAddress selectByUserIdAndAddressId(@RequestParam("userId") String userId,
                                           @RequestParam("addressId") String addressId);


}
